#ifndef TMSCRIPTRUN_H
#define TMSCRIPTRUN_H

#include <QtCore>
#include "Python.h"


class TmScriptRun : public QThread
{
    Q_OBJECT
public:
    TmScriptRun();
    bool GetIsRunning();
    void SetStop();
    void SetExit();
    void LoadScript(QString strPath);
    void LoadContent(QByteArray bContent);
    QString GetScriptPath();
private:
    QString m_strPath;
    PyObject* m_pModule;
    PyObject *m_pFuncInit, *m_pFuncRun, *m_pFuncStop;
    bool m_bExit, m_bIsRunning, m_bLoad;
    // QThread interface
protected:
    void run();
};

#endif // TMSCRIPTRUN_H
